/**
 *  Created by clz on
 *  Function:
 *  Desc:
 */
import React, {Component} from 'react';
import {View, StyleSheet, Button, Alert,NativeModules,Platform} from 'react-native';

export default class Communication extends Component {
    constructor(props) {
        super(props);
        this.state = {};
    }

    render() {
        return (
            <View style={styles.container}>
                <Button title={'调用原生组件'} onPress={() => {
                    if (Platform.OS === 'android') {
                        NativeModules.Communication.startActivityFromReactNative('com.cho3.CommunicationActivity','12345')
                    }
                }}/>
            </View>
        )
    }
}
const styles = StyleSheet.create({
    container: {
        flex: 1,
        alignItems: 'center',
        justifyContent: 'center'
    }
});
